package org.epidroid.epidroid.chronos.engine.objects;

import java.util.Date;
import java.util.List;

import org.epidroid.epidroid.chronos.engine.utils.ChronosUtils;

public class ChronosWeek implements Printable {

	private String _id = null;
	private Date _date = null;
	private List<ChronosDay> _days = null;

	public ChronosWeek(String id) {
		_id = id;
	}

	public String getId() {
		return _id;
	}

	public void setDays(List<ChronosDay> days) {
		_days = days;

		for (ChronosDay day : days) {
			day.setWeek(this);
		}
		_date = days.get(0).getDate();
	}

	public Date getDate() {
		return _date;
	}

	public List<ChronosDay> getDays() {
		return _days;
	}

	public void print(Integer indent) {
		ChronosUtils.printWithIndent(indent, "Week:");
		indent += 4;
		ChronosUtils.printWithIndent(indent, "id: " + _id);
		for (ChronosDay day : _days) {
			day.print(indent);
		}
	}

}
